<?php if (!defined('THINK_PATH')) exit(); $databases_filed_type = C('DATABASES_FILED_TYPE'); $input_type = C('INPUT_TYPES'); ?>
<tr class="template">
    <td><input type="text" name="fields[]" required class="form-control" placeholder="请输入字段名称"/></td>
    <td class="database">
        <div class="form-group">
            <select name="types[]" class="form-control select select-default">
                <?php if(is_array($databases_filed_type)): foreach($databases_filed_type as $key=>$d): ?><option value="<?php echo ($d); ?>"><?php echo ($d); ?></option><?php endforeach; endif; ?>
            </select>
        </div>
    </td>
    <td class="database"><input type="text" name="lengths[]" class="form-control" placeholder="长度"/></td>
    <td>
        <select name="form[]" class="form-control select select-default">
            <?php if(is_array($input_type)): foreach($input_type as $key=>$i): ?><option value="<?php echo ($i); ?>"><?php echo ($i); ?></option><?php endforeach; endif; ?>
        </select>
    </td>
    <td><input type="text" name="defaults[]" class="form-control" value=""/></td>
    <td class="database">
        <select name="indexs[]" class="form-control select select-default" style="width:50px;">
            <option value="">无索引</option>
            <option value="primary key">primary</option>
            <option value="unique">unique</option>
            <option value="index">index</option>
        </select>
    </td>
    <td class="database">
        <select name="ai[]" class="form-control select select-default">
            <option value="0">无</option>
            <option value="1">自增长</option>
        </select>
    </td>
    <td><input type="text" name="comment[]" class="form-control" placeholder="字段注释"/></td>
    <td><a href="javascript:" class="fui-cross" onclick="romove_row(this)"></a></td>
</tr>
<script type="text/javascript">
    //下拉框
    $("select").select2();
</script>